<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        window.onload = function(){
            // document:是浏览器存在的一个内置对象
            var div_2 = document.getElementById('div-2')
            console.log(div_2)
        }
    </script>
</head>

<body>
    <div id="div-1">斗破苍穹</div>
    <div id="div-2">诛仙</div>

</body>
<script>
    var div_1 = document.getElementById('div-1')
    console.log(div_1)
</script>
</html>